<%--
  Created by IntelliJ IDEA.
  User: 李学健
  Date: 2024/3/9
  Time: 14:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    //解析请求前加上这一句，传输的中文就不会乱码了
    request.setCharacterEncoding("utf-8");
    String name = request.getParameter("name");
    String gender = request.getParameter("gender");

    session.setAttribute("name", name);
    session.setAttribute("gender", gender);
%>

<img src="wen.jpg" alt="加载中" width="200">
<br>
<%
    if (gender.equals("female")) {
        out.print(name + "女士,你好,请继续完成调查");
    } else {
        out.print(name + "先生,你好,请继续完成调查");

    }
%>
<br>
你感兴趣的业余爱好有：
<br>
<form action="index03.jsp" method="post">

    <%--@declare id="subject"--%><label for="subject">
    <input name="subject" type="checkbox" value="影视欣赏">影视欣赏
    <br>
    <input name="subject" type="checkbox" value="阅读书籍">阅读书籍
    <br>

    <input name="subject" type="checkbox" value="体育运动">体育运动
    <br>

    <input name="subject" type="checkbox" value="户外旅游">户外旅游
    <br>

    <input name="subject" type="checkbox" value="流行音乐">流行音乐
</label>
    <br>

    <input type="submit" value="下一步">
    <input type="reset" value="重置">
</form>

</body>
</html>
